/* eslint-disable */
// 获取url query属性
function getSearchAttr (str) {
  const obj = {}
  const search = location.search
  search.substr(1).split('&')?.forEach(ele => {
    const arr = ele.split('=')
    obj[arr[0]] = arr[1]
  })
  return obj[str]
}

// 获取url query属性
function getQueryAttr (str) {
  const obj = {}
  location.hash?.substr(location.hash?.indexOf('?') + 1).split('&')?.forEach(ele => {
    const arr = ele.split('=')
    obj[arr[0]] = arr[1]
  })
  return obj[str]
}

export default {
  getSearchAttr,
  getQueryAttr
}
